package com.cx.service;

import com.cx.framework.Autowrited;
import com.cx.framework.BeanNameAware;
import com.cx.framework.Component;
import com.cx.framework.InitializingBean;

/**
 * @Author:cxy
 * @Date:2020/10/11 15:56
 */
@Component("userService")
public class UserService implements BeanNameAware, InitializingBean {

    @Autowrited
    private OrderService orderService;

    private String beanName;

    @Override
    public void setBeanName(String name) {
        this.beanName = name;
    }

    @Override
    public void afterPropertiesSet() {
        if(orderService == null){
            System.out.println("11111111111111111111111");
        }
    }

    public void test(){
        System.out.println(orderService);
        System.out.println(beanName);
    }
}
